@use "@/styles/variables" as *;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: $bg-color;
  color: $text-primary;
  overflow: hidden;
  touch-action: none;
  -webkit-overflow-scrolling: none;
  overscroll-behavior: none;
  @media screen and (min-width: 600px) {
    overflow: auto;
    background: #f5f5f5;
  }
}

// 添加移动端最大宽度限制
#app {
  margin: 0 auto;
  width: 100%;
  max-width: 600px; // 设置最大宽度
  height: 100vh;
  background: #fff;
  position: relative;
  overflow: hidden;

  // 在大屏幕上添加阴影效果，使其看起来更像手机应用
  @media screen and (min-width: 600px) {
    height: 100vh;
    overflow: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    &::-webkit-scrollbar {
      display: none;
    }
  }
}


// 给body添加背景色，这样在大屏幕上两侧的空白区域会有不同的背景色
body {
  @media screen and (min-width: 600px) {
    background: #f5f5f5;
  }
}

// 全局样式重置和通用样式
a {
  text-decoration: none;
  color: inherit;
}

input, button {
  outline: none;
  border: none;
  background: none;
}

// 移动端点击高亮去除
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: auto;
  user-select: auto;
}

// 全局导航栏样式
.custom-nav {
  .van-nav-bar {
    color: #333;
    font-size: 18px;
    font-weight: 500;
    background: linear-gradient(to bottom, #F8E6FF, #F0E6FF);
  }
  .van-nav-bar__title {
    color: #333;
    font-size: 18px;
    font-weight: 500;
  }
  .van-icon {
    color: #333;
    font-size: 20px;
  }
}

// 移动端滚动容器
.page-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  @media screen and (min-width: 600px) {
    &::-webkit-scrollbar {
      display: none;
    }
  }
  .content-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    @media screen and (min-width: 600px) {
      &::-webkit-scrollbar {
        display: none;
      }
    }
  }
}










